package com.reverie.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.reverie.entity.Attribute;
import com.reverie.mapper.AttributeMapper;
import com.reverie.service.IAttributeService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import java.util.Collection;
import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author Rui.Zhou
 * @since 2024-02-03
 */
@Service
public class AttributeServiceImpl extends ServiceImpl<AttributeMapper, Attribute> implements IAttributeService {

    @Override
    public List<Attribute> listByAttrIds(Collection<Integer> attrIds) {
        QueryWrapper<Attribute> wrapper = new QueryWrapper<>();
        wrapper.lambda().in(Attribute::getAttrId,attrIds);
        return list(wrapper);
    }
}
